package com.streambolics.servlet;

import javax.servlet.http.HttpServletRequest;

import com.streambolics.std.WebClientInfo;

/**
 * A WebClientInfo that parses the input from a request to initialize itself.
 * 
 * @author Sauron
 * 
 */

public class ServletClientInfo extends WebClientInfo
{
    public ServletClientInfo(HttpServletRequest aRequest)
    {
        parse (aRequest);
    }

    /**
     * A way to retrieve the servlet info from a request. Calling this is
     * preferable to create a new info each time, as we might try to cache data
     * in the session.
     * 
     * @param aRequest
     *            The client request to parse.
     * @return A ServletClientInfo initialized from the data retrieved in the
     *         request.
     */

    public static ServletClientInfo getFor (HttpServletRequest aRequest)
    {
        return new ServletClientInfo (aRequest);
    }

    protected void parse (HttpServletRequest aRequest)
    {
    }

}
